package me.jollyfly.jshop.item.server.service.impl;

import me.jollyfly.jshop.item.client.model.ItemDO;
import me.jollyfly.jshop.item.server.dao.ItemDAO;
import me.jollyfly.jshop.item.server.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author wanzhichao
 */

@Service
public class ItemServiceImpl implements ItemService {

    @Autowired
    private ItemDAO itemDAO;



    @Override
    @Transactional(rollbackFor = Exception.class)
    public Boolean addItem(ItemDO itemDO) {
        return itemDAO.insertSelective(itemDO) == 1;
    }
}
